@import url("https://fonts.googleapis.com/css?family=Inconsolata|Lato:300,400,700");

body {
  color: #eee;
  font-family: "Lato", sans-serif;
  font-size: 62.5%;
  padding: 0 20px;
  box-sizing: border-box;
}
code {
  font-family: "Inconsolata", monospace;
  padding: 0.2em 0.4em;
}

.content {
  border-radius: 8px;
  box-sizing: border-box;
  color: #666;
  font-size: 1.6em;
  line-height: 1.4em;
  margin: 20px auto;
  margin-top: 80px;
  padding: 20px;
  width: 100%;
  max-width: 800px;
}
.content ul {
  margin: 0.5em 2em;
  padding: 0;
}

.links {
  background-color: #123;
  background-image: linear-gradient(to bottom, #0003, transparent);
  border-bottom: 1px solid #0003;
  box-shadow: 0 0 32px #0003;
  font-size: 2em;
  font-weight: 300;
}
.links > a {
  color: #9ab;
  padding: 0.75em;
  text-align: center;
  text-decoration: none;
  transition: all 0.5s;
}
.links > a:hover {
  background: #ffffff06;
  color: #adf;
}
.links > .line {
  background: #68a;
  height: 1px;
  pointer-events: none;
}

#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}
.links {
  display: grid;
  grid-template-columns: repeat(var(--items), 1fr);
  position: relative;
}
.links > .line {
  opacity: 0;
  transition: all 0.5s;
  position: absolute;
  bottom: 0;
  left: var(--left, calc(100% / var(--items) * (var(--index) - 1)));
  width: var(--width, calc(100% / var(--items)));
  --index: 0;
}

.links > a:hover ~ .line {
  opacity: 1;
}

#header {
  z-index: 9999;
}

.links > a:nth-of-type(1):hover ~ .line {
  --index: 1;
}
.links > a:nth-of-type(2):hover ~ .line {
  --index: 2;
}
.links > a:nth-of-type(3):hover ~ .line {
  --index: 3;
}
.links > a:nth-of-type(4):hover ~ .line {
  --index: 4;
}
.links > a:nth-of-type(5):hover ~ .line {
  --index: 5;
}
.links > a:last-of-type:hover ~ .line {
  --index: var(--items);
}
